import twilltestlib
from twill.browser import TwillBrowser

def test():
    url = twilltestlib.get_url()
    b1 = TwillBrowser()
    b2 = TwillBrowser()
    b1.go(url)
    b2.go(url)
    
    assert b1 is not b2
    
    b1.clear_cookies()
    assert b1.cj != b2.cj
    
    b1.clear_extra_headers()
    assert b1._browser.addheaders != b2._browser.addheaders
    
    assert b1.get_html() == b2.get_html()
    b2.go('http://google.com')
    assert b1.get_html() != b2.get_html()
    